Fix: Add retry limit and signal handlers to prevent Electron hang#324
Fix: Add retry limit and signal handlers to prevent Electron hang#324upendra512 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
Add maxRetries parameter to waitForServer (default 60 attempts = 30s) to prevent infinite hang when Nitro server fails to start. The app now gracefully quits with an error message instead of hanging forever. Also add SIGTERM and SIGINT handlers for clean shutdown, ensuring the server process is properly killed when receiving termination signals. Fixes AOSSIE-Org#312 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding |
Description
Fixes Issue #312 - Electron hangs forever if Nitro server fails to start
Changes
1. Added Retry Limit to waitForServer
2. Added Error Handling
3. Added Signal Handlers
Testing
Technical Details
Before: waitForServer would retry indefinitely every 500ms. If Nitro crashed or failed to start, Electron would hang forever with no feedback to the user.
After: Retries for maximum 30 seconds (60 attempts × 500ms), shows error message, quits gracefully, and properly handles termination signals for clean process shutdown.
Related Issue
Closes #312